package com.rd.student.jike.class5.wujunhao.day010703;

import java.util.Objects;

public class Person {
    private String name;
    public Person(String name){
        this.name = name;
    }
    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if ((o == null || getClass() != o.getClass())) {
            return false;
        }
        Person person = (Person) o;
        return Objects.equals(name,person.name);
    }
    @Override
    public int hashCode(){
        return Objects.hash(name);
    }
    @Override
    public String toString(){
        return name;
    }
}
